'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	console.log(event,'event')
	const {
		user_id,
		telephone,
		nickName,
		realName,
		birth,
		height,
		education,
		intro,
		hobby,
		demand,
		address,
		isCar,
		isHouse,
		position,
		department,
		redidence,
		addtime,
		sex,
		money,
		wedding,
		imgList,
		emotional
	} = event
	await db.collection('users').add({
		user_id,
		telephone,
		nickName,
		realName,
		birth,
		height,
		education,
		intro,
		hobby,
		demand,
		address,
		isCar,
		isHouse,
		position,
		department,
		redidence,
		addtime,
		sex,
		money,
		wedding,
		imgList,
		emotional
	})
	//返回数据给客户端
	return {
		code: 200,
		msg: '数据创建成功'
	}
};